package com.cxf.windex.enums;

/**
 * @author chenxf
 * @version V1.0
 * @date 2018-11-28 15:47
 **/
public enum  ArticleTypeEnum {
    /**
     * 常见问题
     */
    QA("1", "常见问题"),
    /**
     * 分享说明
     */
    SHARE_TYPE("0", "分享说明")
    ;

    private final String key;
    private final String desc;

    private ArticleTypeEnum(String key, String desc) {
        this.key = key;
        this.desc = desc;
    }

    public static ArticleTypeEnum getIdType(String idType) {
        ArticleTypeEnum[] its = values();
        ArticleTypeEnum[] arr$ = its;
        int len$ = its.length;

        for(int i$ = 0; i$ < len$; ++i$) {
            ArticleTypeEnum it = arr$[i$];
            if (it.getKey() .equals( idType)) {
                return it;
            }
        }

        return QA;
    }

    public String getKey() {
        return this.key;
    }

    public String getDesc() {
        return this.desc;
    }
}
